Skip to content

feat: bump module version to v9 - #22578

Open
kruskall wants to merge 2 commits into
elastic:mainfrom
kruskall:bump/module-version
Open

kruskall wants to merge 2 commits into
elastic:mainfrom
kruskall:bump/module-version

Conversation

@kruskall

Copy link
Copy Markdown
Member

Motivation/summary

This is the first step to resolve #21111 and have proper versioning in go module.

Update go module path to append v9 on main and 9.x branche so the compiler will use a v9.0.0-hash pseudo version.

This is a requirement to have it pick it up the correct tag.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

Related to #21111

@kruskall
kruskall requested a review from a team as a code owner November 25, 2026 00:02
Copilot AI balanced review requested due to automatic review settings November 25, 2026 00:02
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify

mergify Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @kruskall? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8.19 is the label to automatically backport to the 8.19 branch.
  • backport-9./d is the label to automatically backport to the 9./d branch. /d is the digit.
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@mergify

mergify Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new /v9 imports conflict with unchanged module declarations in systemtest and integrationservertest, breaking local package resolution and compilation.

2 open issues
What changed in this PR

This PR introduces the /v9 Go module path for APM Server as a first step toward correct 9.x version metadata, addressing the vulnerability-scan false positives described in #21111.

Changes:

  • Changes the root module declaration to github.com/elastic/apm-server/v9.
  • Rewrites imports across server code, tests, and test utilities.
  • Updates the linker symbol used to inject the release qualifier.
File Description
x-pack/​apm-server/​sampling/​pubsub/​pubsub.go Updates logging import.
x-pack/​apm-server/​sampling/​pubsub/​pubsub_test.go Updates pubsub test import.
x-pack/​apm-server/​sampling/​pubsub/​pubsub_integration_test.go Updates pubsub integration-test import.
x-pack/​apm-server/​sampling/​pubsub/​config_test.go Updates configuration-test import.
x-pack/​apm-server/​sampling/​processor.go Updates sampling processor imports.
x-pack/​apm-server/​sampling/​processor_test.go Updates processor-test imports.
x-pack/​apm-server/​sampling/​processor_bench_test.go Updates sampling benchmark import.
x-pack/​apm-server/​sampling/​eventstorage/​storage_manager.go Updates logging import.
x-pack/​apm-server/​sampling/​eventstorage/​storage_manager_test.go Updates storage-test import.
x-pack/​apm-server/​sampling/​eventstorage/​storage_bench_test.go Updates storage benchmark import.
x-pack/​apm-server/​sampling/​eventstorage/​rw_test.go Updates storage-test import.
x-pack/​apm-server/​sampling/​eventstorage/​prefix_test.go Updates storage-test import.
x-pack/​apm-server/​sampling/​eventstorage/​pebble.go Updates logging import.
x-pack/​apm-server/​sampling/​config.go Updates sampling configuration imports.
x-pack/​apm-server/​sampling/​config_test.go Updates sampling configuration-test imports.
x-pack/​apm-server/​root.go Updates command package import.
x-pack/​apm-server/​root_nofips_test.go Updates non-FIPS command-test import.
x-pack/​apm-server/​root_fips_test.go Updates FIPS command-test import.
x-pack/​apm-server/​main.go Updates server entry-point imports.
x-pack/​apm-server/​main_test.go Updates server-test imports.
x-pack/​apm-server/​aggregation.go Updates aggregation imports.
systemtest/​tls_test.go Rewrites TLS test-helper import.
systemtest/​tls_nofips_test.go Rewrites non-FIPS TLS test-helper import.
systemtest/​sourcemap_test.go Rewrites sourcemap test-helper imports.
systemtest/​sampling_test.go Rewrites sampling test-helper imports.
systemtest/​rum_test.go Rewrites browser-monitoring test-helper imports.
systemtest/​otlp_test.go Rewrites OTLP test-helper imports.
systemtest/​monitoring_test.go Rewrites monitoring test-helper imports.
systemtest/​metrics_test.go Rewrites metrics test-helper imports.
systemtest/​main_test.go Rewrites test entry-point import.
systemtest/​logstash_test.go Rewrites Logstash test-helper import.
systemtest/​logging_test.go Rewrites logging test-helper imports.
systemtest/​kibana.go Rewrites Kibana helper imports.
systemtest/​keystore_nofips_test.go Rewrites keystore test-helper import.
systemtest/​intake_test.go Rewrites intake test-helper imports.
systemtest/​intake_log_test.go Rewrites log-intake test-helper imports.
systemtest/​instrumentation_test.go Rewrites instrumentation test-helper imports.
systemtest/​ingest_test.go Rewrites ingest test-helper imports.
systemtest/​huge_traces_test.go Rewrites large-trace test-helper imports.
systemtest/​http2_test.go Rewrites HTTP/2 test-helper import.
systemtest/​headers_test.go Rewrites header test-helper imports.
systemtest/​gencorpora/​apmserver.go Rewrites corpus-generator helper import.
systemtest/​export_test.go Rewrites configuration-export test-helper import.
systemtest/​errors_test.go Rewrites error test-helper imports.
systemtest/​errorgrouping_test.go Rewrites error-grouping test-helper imports.
systemtest/​environment_test.go Rewrites environment test-helper imports.
systemtest/​elasticsearch.go Rewrites Elasticsearch helper import.
systemtest/​cmdflags_test.go Rewrites command-flag test-helper import.
systemtest/​cmd/​runapm/​main.go Rewrites server-runner import.
systemtest/​cmd/​gencorpora/​main.go Rewrites corpus-generator import.
systemtest/​cmd/​buildapm/​main.go Rewrites build-helper import.
systemtest/​cmd/​apmbench/​main.go Rewrites benchmark command import.
systemtest/​benchtest/​main.go Rewrites benchmark monitoring import.
systemtest/​benchtest/​main_test.go Rewrites benchmark-test import.
systemtest/​auth_test.go Rewrites authentication test-helper imports.
systemtest/​apmservertest/​server_test.go Rewrites server-helper test import.
systemtest/​aggregation_test.go Rewrites aggregation test-helper imports.
systemtest/​agentconfig.go Rewrites agent-configuration helper import.
systemtest/​agentconfig_test.go Rewrites agent-configuration test-helper imports.
Makefile Updates release-qualifier linker symbol.
internal/​sourcemap/​sourcemap_fetcher.go Updates logging import.
internal/​sourcemap/​processor_test.go Updates sourcemap processor-test imports.
internal/​sourcemap/​metadata_fetcher.go Updates metadata-fetcher imports.
internal/​sourcemap/​metadata_fetcher_test.go Updates metadata-fetcher test import.
internal/​sourcemap/​kibana.go Updates Kibana sourcemap imports.
internal/​sourcemap/​kibana_test.go Updates Kibana sourcemap test import.
internal/​sourcemap/​elasticsearch.go Updates Elasticsearch sourcemap imports.
internal/​sourcemap/​elasticsearch_test.go Updates Elasticsearch sourcemap test imports.
internal/​sourcemap/​chained.go Updates logging import.
internal/​sourcemap/​body_caching.go Updates logging import.
internal/​sourcemap/​body_caching_test.go Updates cache-test import.
internal/​publish/​pub_test.go Updates publisher-test import.
internal/​model/​modelprocessor/​libraryframe_test.go Updates model-processor test import.
internal/​model/​modelprocessor/​excludefromgrouping_test.go Updates model-processor test import.
internal/​model/​modelprocessor/​eventcounter_test.go Updates event-counter test imports.
internal/​logs/​ratelimit_test.go Updates logging-test import.
internal/​kibana/​client.go Updates version package import.
internal/​elasticsearch/​client.go Updates version package import.
internal/​elasticsearch/​client_test.go Updates version test import.
internal/​beater/​tracing.go Updates tracing-server imports.
internal/​beater/​tracing_test.go Updates tracing test-helper import.
internal/​beater/​telemetry.go Updates configuration import.
internal/​beater/​telemetry_test.go Updates telemetry-test import.
internal/​beater/​server.go Updates core server imports.
internal/​beater/​server_test.go Updates core server-test imports.
internal/​beater/​request/​context.go Updates request-context imports.
internal/​beater/​request/​context_test.go Updates request-context test imports.
internal/​beater/​processors.go Updates event-processor imports.
internal/​beater/​processors_test.go Updates processor-test import.
internal/​beater/​otlp/​http.go Updates OTLP HTTP handler imports.
internal/​beater/​otlp/​http_test.go Updates OTLP HTTP test imports.
internal/​beater/​otlp/​http_internal_test.go Updates internal OTLP HTTP test imports.
internal/​beater/​otlp/​grpc_test.go Updates OTLP gRPC test imports.
internal/​beater/​otlp/​clientmetadata.go Updates interceptor import.
internal/​beater/​otlp/​clientmetadata_test.go Updates client-metadata test imports.
internal/​beater/​middleware/​tracing_middleware.go Updates request package import.
internal/​beater/​middleware/​response_headers_middleware.go Updates request package import.
internal/​beater/​middleware/​recover_panic_middleware.go Updates request package import.
internal/​beater/​middleware/​recover_panic_middleware_test.go Updates panic-recovery test import.
internal/​beater/​middleware/​rate_limit_middleware.go Updates rate-limit middleware imports.
internal/​beater/​middleware/​rate_limit_middleware_test.go Updates rate-limit middleware test imports.
internal/​beater/​middleware/​monitoring_middleware.go Updates request package import.
internal/​beater/​middleware/​monitoring_middleware_test.go Updates monitoring middleware test imports.
internal/​beater/​middleware/​middleware.go Updates request package import.
internal/​beater/​middleware/​middleware_test.go Updates middleware-test import.
internal/​beater/​middleware/​log_middleware.go Updates logging middleware imports.
internal/​beater/​middleware/​log_middleware_test.go Updates logging middleware test imports.
internal/​beater/​middleware/​kill_switch_middleware.go Updates request package import.
internal/​beater/​middleware/​cors_middleware.go Updates cross-origin middleware imports.
internal/​beater/​middleware/​cors_middleware_test.go Updates cross-origin middleware test imports.
internal/​beater/​middleware/​auth_middleware.go Updates authentication middleware imports.
internal/​beater/​middleware/​auth_middleware_test.go Updates authentication middleware test imports.
internal/​beater/​interceptors/​timeout_test.go Updates timeout-test import.
internal/​beater/​interceptors/​ratelimit.go Updates rate-limit package import.
internal/​beater/​interceptors/​ratelimit_test.go Updates rate-limit interceptor test imports.
internal/​beater/​interceptors/​metrics.go Updates request package import.
internal/​beater/​interceptors/​metrics_test.go Updates metrics interceptor test imports.
internal/​beater/​interceptors/​metadata.go Updates network utility import.
internal/​beater/​interceptors/​auth.go Updates authentication interceptor imports.
internal/​beater/​interceptors/​auth_test.go Updates authentication interceptor test imports.
internal/​beater/​http.go Updates configuration import.
internal/​beater/​config/​sampling.go Updates Elasticsearch import.
internal/​beater/​config/​rum.go Updates Elasticsearch import.
internal/​beater/​config/​rum_test.go Updates browser-monitoring configuration-test import.
internal/​beater/​config/​config.go Updates logging import.
internal/​beater/​config/​config_test.go Updates configuration-test import.
internal/​beater/​config/​auth.go Updates Elasticsearch import.
internal/​beater/​config/​auth_test.go Updates authentication configuration-test import.
internal/​beater/​config/​agentconfig.go Updates Elasticsearch import.
internal/​beater/​beatertest/​server.go Updates core server import.
internal/​beater/​beater.go Updates server orchestration imports.
internal/​beater/​beater_test.go Updates orchestration-test imports.
internal/​beater/​auth/​authenticator.go Updates authenticator imports.
internal/​beater/​auth/​authenticator_test.go Updates authenticator-test imports.
internal/​beater/​auth/​apikey.go Updates Elasticsearch import.
internal/​beater/​auth/​apikey_test.go Updates API-key test imports.
internal/​beater/​auth/​anonymous_test.go Updates anonymous-authentication test imports.
internal/​beater/​api/​root/​handler.go Updates root-handler imports.
internal/​beater/​api/​root/​handler_test.go Updates root-handler test imports.
internal/​beater/​api/​mux.go Updates API routing imports.
internal/​beater/​api/​mux_test.go Updates API routing test imports.
internal/​beater/​api/​mux_root_test.go Updates root-route test imports.
internal/​beater/​api/​mux_intake_rum_test.go Updates browser-intake route test imports.
internal/​beater/​api/​mux_intake_backend_test.go Updates backend-intake route test imports.
internal/​beater/​api/​mux_expvar_test.go Updates monitoring-route test import.
internal/​beater/​api/​mux_config_agent_test.go Updates agent-configuration route test imports.
internal/​beater/​api/​intake/​handler.go Updates intake-handler imports.
internal/​beater/​api/​intake/​handler_test.go Updates intake-handler test imports.
internal/​beater/​api/​config/​agent/​handler.go Updates agent-configuration handler imports.
internal/​beater/​api/​config/​agent/​handler_test.go Updates agent-configuration handler test imports.
internal/​beatcmd/​version.go Updates version package import.
internal/​beatcmd/​testcmd.go Updates configuration import.
internal/​beatcmd/​beat.go Updates version package import.
internal/​beatcmd/​beat_test.go Updates version test import.
internal/​agentcfg/​kibana.go Updates Kibana client import.
internal/​agentcfg/​kibana_test.go Updates Kibana client test import.
internal/​agentcfg/​elasticsearch.go Updates agent-configuration backend imports.
internal/​agentcfg/​elasticsearch_test.go Updates Elasticsearch test import.
integrationservertest/​upgrade_test.go Rewrites upgrade-test imports.
integrationservertest/​timestamp_us_test.go Rewrites timestamp regression-test imports.
integrationservertest/​steps.go Rewrites test-step helper imports.
integrationservertest/​setup.go Rewrites test-setup helper imports.
integrationservertest/​scripts/​genpath/​versions_snapshot.go Rewrites snapshot-version helper import.
integrationservertest/​scripts/​genpath/​versions_bc.go Rewrites build-candidate helper import.
integrationservertest/​scripts/​genpath/​main.go Rewrites upgrade-path generator imports.
integrationservertest/​main_test.go Rewrites test entry-point import.
integrationservertest/​internal/​kibana/​client.go Rewrites cloud helper import.
integrationservertest/​internal/​kibana/​client_test.go Rewrites Kibana client test import.
integrationservertest/​internal/​gen/​generator.go Rewrites telemetry-generator helper imports.
integrationservertest/​internal/​ech/​client_test.go Rewrites cloud-client test import.
integrationservertest/​internal/​asserts/​es_logs_test.go Rewrites log-assertion test import.
integrationservertest/​internal/​asserts/​doc_count.go Rewrites Elasticsearch helper import.
integrationservertest/​internal/​asserts/​doc_count_test.go Rewrites document-count test import.
integrationservertest/​internal/​asserts/​data_streams_test.go Rewrites data-stream assertion test import.
integrationservertest/​config.go Rewrites configuration helper import.
integrationservertest/​config_test.go Rewrites configuration-test import.
go.mod Declares the root /v9 module path.
cmd/​apm-server/​main.go Updates server command imports.

Review effort: Balanced

Comment thread integrationservertest/steps.go Resolved
Comment thread systemtest/main_test.go Resolved
Copilot AI balanced review requested due to automatic review settings November 25, 2026 00:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the APM Server v9 module-path migration.

2 open issues

Review effort: Balanced

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker image: inaccurate version number for apm-server binary triggers false positive in Trivy vulnerability scans

2 participants